package org.wisdom.s3.job.domain.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import javax.persistence.*;

import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.wisdom.data.jpa.entity.ObjectEntity;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 基础实体
 *
 * @author yowu
 */
@EqualsAndHashCode(callSuper = true)
@Data
@MappedSuperclass
public class BasicBean extends ObjectEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Column(name = "CREATED_BY", updatable = false)
    @CreatedBy
    private String createdBy;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "CREATED_DATE", updatable = false)
    @CreatedDate
    private Date createdDate;

    @Column(name = "DELETED_BY")
    private String deletedBy;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "DELETED_DATE")
    private Date deletedDate;

    @Column(name = "DELETED_FLAG")
    private Long deletedFlag;

    @Column(name = "LAST_UPDATED_BY")
    @LastModifiedBy
    private String lastUpdatedBy;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "LAST_UPDATE_DATE")
    @LastModifiedDate
    private Date lastUpdateDate;

    @Transient
    private String lastUpdateDateStr;

    @Column(name = "RECORD_VERSION")
    private Long recordVersion;
   
    @Column(name = "ATTRIBUTE1")
    private String attribute1;

    @Column(name = "ATTRIBUTE2")
    private String attribute2;

    @Column(name = "ATTRIBUTE3")
    private String attribute3;

    @Column(name = "ATTRIBUTE4")
    private String attribute4;

    @Column(name = "ATTRIBUTE5")
    private String attribute5;
    
    /**查询参数信息*/
    @Transient
    private Map<String,Object> paramsMap = new HashMap<String,Object>();

}


